extends Node2D

@export var audioNode: AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	# 当我按下空格时播放，再按下暂停，再按下继续播放，再按下暂停。。。
	if Input.is_action_just_pressed("跳跃"):
		if !audioNode.playing:
			if audioNode.stream_paused:
				audioNode.stream_paused = false
			else:
				audioNode.play()
		else:
			audioNode.stream_paused = true
	elif Input.is_action_just_released("跳跃"):
		print("刚抬起了跳跃")
	elif Input.is_action_pressed("跳跃"):
		print("按着跳跃")
	pass
